﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;

/// <summary>
/// Descripción breve de Catalogo
/// </summary>
public class Catalogo
{
    private string codigopatologia;
    private string codigoproducto;
    private string salida;
    private string sql;
    private AccesoDatos AD;
    private string RutaBD;
    private SqlConnection cn;
    private SqlDataAdapter ad;
    private DataSet ds;
	public Catalogo()

	{
        RutaBD = "Data Source=localhost;Initial Catalog=BaseGelForm;Integrated Security=True";
        cn = new SqlConnection(RutaBD);
        sql = "Select * from Patologias";
        ad = new SqlDataAdapter(sql, cn);
        ds = new DataSet();
        ad.Fill(ds, "Patologias");
        salida = "";
        foreach (DataRow fila in ds.Tables["Patologias"].Rows)
        {
            salida += "<a id=\"Patologia\"href=\"Inicio.aspx?funcion=CatalogoProductos&valor=" + fila[0].ToString() + "\"";
            salida += ">";
            salida += "<div class='itemmenu'>" + fila["DESCRIPCION"].ToString() + "</div></a>";
        }

	}

    public string salidaHTML
    {
        get
        {
            return salida;
        }
    }





}